<?php
/**
 * Created by PhpStorm.
 * User: wzy12
 * Date: 2018/9/25
 * Time: 13:21
 */

namespace app\admin\validate;


use think\Validate;

class GoodsAttr extends Validate
{
    protected $rule = [
        'attr_name|属性名'  =>  'require|max:30',
        'model_id' => 'require|number',
        'input_mode|输入方式' => 'require|number',
        '__token__' => 'token|require'
    ];

    protected $message = [
        '__token__.require'  =>  '请不要进行非法操作',
        'model_id.number' => '请不要进行非法操作',
        'model_id.require' => '请选择模型名称',
        'input_mode.number' => '请不要进行非法操作'
    ];

    protected $scene = [
        'del'  =>  ['__token__'],
    ];
}